{% extends 'layout.html' %}

{% block title %}
    <title>修改密码</title>
{% endblock %}

{% block content %}
    <div class="panel panel-default">
        <!-- Default panel contents -->
        <div class="panel-heading">修改密码</div>
        <!-- form表单-->
        <div style="box-sizing: border-box;padding: 20px">
            <form method="post" action="{% url 'user_personal_pwd' %}?id={{ form.instance.id }}" novalidate>
                {#   解决跨站防御攻击 #}
                {% csrf_token %}
                <div class="form-group">
                    <label>旧密码</label>
                    <input type="password" class="form-control" name="old_pwd" placeholder="请输入原始密码">
                </div>
                <div class="form-group">
                    <label>新密码</label>
                    <input type="password" class="form-control" name="new_pwd" placeholder="请输入新密码">
                </div>
                <button type="submit" class="btn btn-primary">提交</button>
                <span style="color: red">{{ message }}</span>
            </form>
        </div>
    </div>

{% endblock %}